---
title: "Class Collection&lt;T> | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Canvas.Collection/Collection`T`/"
---

# Class Collection<T>

> **Inheritance:** `System.Object` -> `System.Collections.ObjectModel.Collection<<T>>` -> Collection&lt;T&gt;

# Class Collection&lt;T&gt;

###### **Namespace**: [Aurigma.DesignAtoms.Canvas.Collection](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Canvas.Collection.md)

###### **Assembly**: Aurigma.DesignAtoms.Model.dll

```csharp title="Syntax"
public class Collection<T> : Collection<T>, IList<T>, ICollection<T>, IList, ICollection, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable where T : class
```

## Implements

* `System.Collections.Generic.IList<<T>>`
* `System.Collections.Generic.ICollection<<T>>`
* `System.Collections.IList`
* `System.Collections.ICollection`
* `System.Collections.Generic.IReadOnlyList<<T>>`
* `System.Collections.Generic.IReadOnlyCollection<<T>>`
* `System.Collections.Generic.IEnumerable<<T>>`
* `System.Collections.IEnumerable`

## Inherited Members

* `System.Collections.ObjectModel.Collection<<T>>.Add(<T>)`
* `System.Collections.ObjectModel.Collection<<T>>.Clear`
* `System.Collections.ObjectModel.Collection<<T>>.CopyTo(<T>[],System.Int32)`
* `System.Collections.ObjectModel.Collection<<T>>.Contains(<T>)`
* `System.Collections.ObjectModel.Collection<<T>>.GetEnumerator`
* `System.Collections.ObjectModel.Collection<<T>>.IndexOf(<T>)`
* `System.Collections.ObjectModel.Collection<<T>>.Insert(System.Int32,<T>)`
* `System.Collections.ObjectModel.Collection<<T>>.Remove(<T>)`
* `System.Collections.ObjectModel.Collection<<T>>.RemoveAt(System.Int32)`
* `System.Collections.ObjectModel.Collection<<T>>.System#Collections#IEnumerable#GetEnumerator`
* `System.Collections.ObjectModel.Collection<<T>>.System#Collections#ICollection#CopyTo(System.Array,System.Int32)`
* `System.Collections.ObjectModel.Collection<<T>>.System#Collections#IList#get_Item(System.Int32)`
* `System.Collections.ObjectModel.Collection<<T>>.System#Collections#IList#set_Item(System.Int32,System.Object)`
* `System.Collections.ObjectModel.Collection<<T>>.System#Collections#IList#Add(System.Object)`
* `System.Collections.ObjectModel.Collection<<T>>.System#Collections#IList#Contains(System.Object)`
* `System.Collections.ObjectModel.Collection<<T>>.System#Collections#IList#IndexOf(System.Object)`
* `System.Collections.ObjectModel.Collection<<T>>.System#Collections#IList#Insert(System.Int32,System.Object)`
* `System.Collections.ObjectModel.Collection<<T>>.System#Collections#IList#Remove(System.Object)`
* `System.Collections.ObjectModel.Collection<<T>>.Count`
* `System.Collections.ObjectModel.Collection<<T>>.Items`
* `System.Collections.ObjectModel.Collection<<T>>.System#Collections#Generic#ICollection<T>#IsReadOnly`
* `System.Collections.ObjectModel.Collection<<T>>.System#Collections#ICollection#IsSynchronized`
* `System.Collections.ObjectModel.Collection<<T>>.System#Collections#ICollection#SyncRoot`
* `System.Collections.ObjectModel.Collection<<T>>.System#Collections#IList#Item(System.Int32)`
* `System.Collections.ObjectModel.Collection<<T>>.System#Collections#IList#IsReadOnly`
* `System.Collections.ObjectModel.Collection<<T>>.System#Collections#IList#IsFixedSize`
* `System.Object.ToString`
* `System.Object.Equals(System.Object)`
* `System.Object.Equals(System.Object,System.Object)`
* `System.Object.ReferenceEquals(System.Object,System.Object)`
* `System.Object.GetHashCode`
* `System.Object.GetType`
* `System.Object.MemberwiseClone`

## Constructors

### Collection

```csharp
public Collection()
```

### Collection

```csharp
public Collection(IEnumerable<T> collection)
```

## Properties

### Item[Int32]

```csharp
public virtual T this[int index] { get; }
```

## Methods

### AddRange

```csharp
public void AddRange(IEnumerable<T> collection)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.Collections.Generic.IEnumerable<<T>>` | *collection* |  |

##### Type Parameters

| Name | Description |
|:---|:---|
| `T` |  |

### ClearItems

```csharp
protected override void ClearItems()
```

##### Overrides

* `System.Collections.ObjectModel.Collection<<T>>.ClearItems`

##### Type Parameters

| Name | Description |
|:---|:---|
| `T` |  |

### OnCollectionCleared

```csharp
protected virtual void OnCollectionCleared(T[] items)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `<T>[]` | *items* |  |

##### Type Parameters

| Name | Description |
|:---|:---|
| `T` |  |

### InsertItem

```csharp
protected override void InsertItem(int index, T item)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.Int32` | *index* |  |
| `<T>` | *item* |  |

##### Overrides

* `System.Collections.ObjectModel.Collection<<T>>.InsertItem(System.Int32,<T>)`

##### Type Parameters

| Name | Description |
|:---|:---|
| `T` |  |

### OnItemAdded

```csharp
protected virtual void OnItemAdded(int index, T item)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.Int32` | *index* |  |
| `<T>` | *item* |  |

##### Type Parameters

| Name | Description |
|:---|:---|
| `T` |  |

### RemoveItem

```csharp
protected override void RemoveItem(int index)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.Int32` | *index* |  |

##### Overrides

* `System.Collections.ObjectModel.Collection<<T>>.RemoveItem(System.Int32)`

##### Type Parameters

| Name | Description |
|:---|:---|
| `T` |  |

### OnItemRemoved

```csharp
protected virtual void OnItemRemoved(int index, T item)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.Int32` | *index* |  |
| `<T>` | *item* |  |

##### Type Parameters

| Name | Description |
|:---|:---|
| `T` |  |

### SetItem

```csharp
protected override void SetItem(int index, T item)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.Int32` | *index* |  |
| `<T>` | *item* |  |

##### Overrides

* `System.Collections.ObjectModel.Collection<<T>>.SetItem(System.Int32,<T>)`

##### Type Parameters

| Name | Description |
|:---|:---|
| `T` |  |

### Move

```csharp
public virtual T Move(int oldIndex, int newIndex)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.Int32` | *oldIndex* |  |
| `System.Int32` | *newIndex* |  |

##### Returns

`<T>`

##### Type Parameters

| Name | Description |
|:---|:---|
| `T` |  |

### OnItemMoved

```csharp
protected virtual void OnItemMoved(int oldIndex, int newIndex, T item)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.Int32` | *oldIndex* |  |
| `System.Int32` | *newIndex* |  |
| `<T>` | *item* |  |

##### Type Parameters

| Name | Description |
|:---|:---|
| `T` |  |

## Events

### ItemAdded

```csharp
public event EventHandler<ItemAddedEventArgs<T>> ItemAdded
```

### ItemRemoved

```csharp
public event EventHandler<ItemRemovedEventArgs<T>> ItemRemoved
```

### ItemMoved

```csharp
public event EventHandler<ItemMovedEventArgs<T>> ItemMoved
```

### CollectionCleared

```csharp
public event EventHandler<CollectionClearedEventArgs<T>> CollectionCleared
```
